package de.tabuma.pm.projectnavigation.entity;

import javax.jdo.*;
import javax.jdo.annotations.*;

/**
 * @author $Author: $
 * @version $Revision: $
 * @since $Date: $
 */
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class ProjectNavigation {

    public static final int TYPE_STANDARD = 1;
    public static final int TYPE_FOLDER = 2;
    public static final int TYPE_DESIGN = 3;
    public static final int TYPE_LOGOUT = 4;

    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    Long id;
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }


    @Persistent
    int projectId;
    public int getProjectId() {
        return projectId;
    }
    public void setProjectId(int projectId) {
        this.projectId = projectId;
    }

    @Persistent
    int navigationId;
    public int getNavigationId() {
        return navigationId;
    }
    public void setNavigationId(int navigationId) {
        this.navigationId = navigationId;
    }

    @Persistent
    String name;
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }

    @Persistent
    int navMode = 0;
    public int getNavMode() {
        return navMode;
    }
    public void setNavMode(int navMode) {
        this.navMode = navMode;
    }

    @Persistent
    int order;
    public int getOrder() {
        return order;
    }
    public void setOrder(int order) {
        this.order = order;
    }

    Integer functionTypeId;
    public int getFunctionTypeId() {
        if(this.functionTypeId==null) {
            this.functionTypeId = TYPE_STANDARD;
        }
        return functionTypeId;
    }

    public void setFunctionTypeId(int functionTypeId) {
        this.functionTypeId = functionTypeId;
    }
    
    Integer functionId;
    public int getFunctionId() {
        if(this.functionId==null) {
            this.functionId = new Integer(0);
        }
        return functionId;
    }
    public void setFunctionId(int functionId) {
        this.functionId = functionId;
    }


}
